<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        var obj={
            name:"obj",
        }
        var bar={
            name:"bar",
            show:function(){
                var name='foo';
                console.log(this.name);
            }
        }
        bar.show.call(obj);
        // 考察点：call 的用法。用 call 改变了 this 的指向，指向 obj，所以 this.name 是 'obj'
    </script>
</body>
</html>